package com.bjfu.intelligentrecognizeserver.mapper;

import com.bjfu.intelligentrecognizeserver.pojo.entity.UploadImageInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UploadMapper {
    //插入上传图片路径
    int insertImage(UploadImageInfo uploadImageInfo);

    //查询用户上传的图片路径
    @Select("select * from upload_image where user_id = #{userId}")
    List<UploadImageInfo> selectImagePathById(String userId);

    @Update("update upload_image set state = 0 where id = #{id}")
    void alterStateById(Integer id);
}
